games *1800

Please click on ads to support us..

C++ Code:

#pragma GCC optimize("O3,unroll-loops")
#include<bits/stdc++.h>
#include<sstream>
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
const long long INF=1'000'000'000'000'000'000;
const int inf = 1'000'000'000;
const long long mod = 998'244'353;
const long long MOD = 1'000'000'007;
const int N = 200'002;
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);
#define T() int tt; cin>>tt; while(tt--)
#define int long long
#define prec cout<<fixed<<setprecision(8);
#define ld long double  
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pipi pair<int, pair<int, int>>
#define vii vector<int>
#define F first
#define S second
#define fill(v,p) memset(v, p, sizeof(v))
// #define print(v) for(auto &z : v)cout<<z<<" ";cout<<'\n';
#define all(v) v.begin(), v.end()
#define PI 3.141592653589793
#define set_bits __builtin_popcountll
#define sz(x) ((int)(x).size())
#define rank asdf
int n, a[N];
void solve(){
  cin>>n;
  for(int i = 0; i < n; i++){
    cin>>a[i];
  }
  sort(a, a+n);
  int cnt = 0, val = -1;
  if((n > 1) && (a[0] == 0) && (a[1] == 0)){
    cout<<"cslnb\n";
    return;
  }
  for(int i = 0; i < n-1; i++){
    if(a[i] == a[i+1])cnt++, val = a[i];
  }
  if(cnt > 1){
    cout<<"cslnb\n"; 
    return;
  }
  if(cnt == 1){
    auto it = lower_bound(a, a+n, val-1) - a;
    if(a[it] == val-1){
      cout<<"cslnb\n";
      return;
    }
  }
  int tot = accumulate(a, a+n, 0LL) - (n*(n-1))/2;
  if(tot&1){
    cout<<"sjfnb\n";
  } else{
    cout<<"cslnb\n";
  }

}
int32_t main()
{
  cin.tie(0) -> sync_with_stdio(false);
  solve();
}


Comments

Submit
0 Comments
More Questions

802M - April Fools' Problem (easy)
577B - Modulo Sum
1555B - Two Tables
1686A - Everything Everywhere All But One
1469B - Red and Blue
1257B - Magic Stick
18C - Stripe
1203B - Equal Rectangles
1536A - Omkar and Bad Story
1509A - Average Height
1506C - Double-ended Strings
340A - The Wall
377A - Maze
500A - New Year Transportation
908D - New Year and Arbitrary Arrangement
199A - Hexadecimal's theorem
519C - A and B and Team Training
631A - Interview
961B - Lecture Sleep
522A - Reposts
1166D - Cute Sequences
1176A - Divide it
1527A - And Then There Were K
1618E - Singers' Tour
1560B - Who's Opposite
182B - Vasya's Calendar
934A - A Compatible Pair
1618F - Reverse
1684C - Column Swapping
57C - Array